package com.zmn.oms.common.constant;

import java.util.Objects;

/**
 * 类描述: 改派缘由配置 常量类
 *
 * @author: liudi
 * @since: 2022/05/07 10:35
 */
public class ConfDistributeReasonConsts {

	/**
	 * 系统自动发起改派
	 */
	public final static int REASON_TYPE_SYSTEM_AUTO_APPLY = 114;

	/**
	 * 品类错误
	 */
	public final static int REASON_TYPE_CATEGORY_WRONG = 115;

	/**
	 * 地址错误
	 */
	public final static int REASON_TYPE_ADDRESS_WRONG = 116;

	/**
	 * 协商转单
	 */
	public final static int REASON_TYPE_NEGOTIATED_TRANSFER_ORDER = 108;

	/**
	 * 用户来电申请改派
	 */
	public final static int REASON_TYPE_USER_CALL_TO_APPLY = 121;


	/**
	 * 获取缘由名称
	 *
	 * @param id 缘由ID
	 * @return 缘由名称
	 */
	public static String getReasonNameById(Integer id) {
		if (Objects.isNull(id)) {
			return "";
		}
		switch (id) {
			case REASON_TYPE_SYSTEM_AUTO_APPLY:
				return "系统自动发起改派";
			case REASON_TYPE_CATEGORY_WRONG:
				return "品类错误";
			case REASON_TYPE_ADDRESS_WRONG:
				return "地址错误";
			case REASON_TYPE_NEGOTIATED_TRANSFER_ORDER:
				return "协商转单";
			case REASON_TYPE_USER_CALL_TO_APPLY:
				return "用户来电申请改派";
			default:
				return "";
		}
	}

}
